﻿<UserControl 
    x:Class="Sidvall.UI.Wpf.Controls.WebControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:vms="clr-namespace:Sidvall.UI.ViewModels;assembly=Sidvall.UI"
    xmlns:local="clr-namespace:Sidvall.UI.Wpf.Controls"
    mc:Ignorable="d" 
    d:DesignHeight="300" d:DesignWidth="300">

    <Grid d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type vms:WebControlViewModel}}">
        <Grid Background="#FFF0F0F0">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <WebBrowser x:Name="WebView" Loaded="WebView_Loaded" Unloaded="WebView_Unloaded" />
            <StackPanel Grid.Row="1" x:Name="ButtonControl" Orientation="Horizontal" HorizontalAlignment="Right"
                        Margin="{Binding ButtonMargin, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:ProgressControl}}}">
                <Button MinWidth="70" Padding="15,3,15,3" IsDefault="True" IsCancel="True" Command="{Binding ActionCommand}" Content="{Binding ActionCaption}" />
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
